<!DOCTYPE html>
<!--thymeleaf模板支持-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>

  <title>TalkingData</title>

  <!-- Bootstrap -->
  <link href="vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
  <!-- Font Awesome -->
  <link href="vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
  <!-- NProgress -->
  <link href="vendors/nprogress/nprogress.css" rel="stylesheet"/>
  <!-- iCheck -->
  <link href="vendors/iCheck/skins/flat/green.css" rel="stylesheet"/>

  <!-- bootstrap-progressbar -->
  <link href="vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"/>
  <!-- JQVMap -->
  <link href="vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
  <!-- bootstrap-daterangepicker -->
  <link href="vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet"/>

  <!-- Custom Theme Style -->
  <link href="build/css/custom.min.css" rel="stylesheet"/>
  <link href="css/maps/td.css" rel="stylesheet"/>
</head>

<body class="nav-md">
<div class="container body">
  <div class="main_container">
    <div class="col-md-3 left_col">
      <div class="left_col scroll-view">
        <div class="navbar nav_title" style="border: 0;">
          <a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>TalkingData</span></a>
        </div>

        <div class="clearfix"></div>

        <!-- menu profile quick info -->
        <div class="profile clearfix">
          <div class="profile_pic">
            <img src="images/img.jpg" alt="..." class="img-circle profile_img"/>
          </div>
          <div class="profile_info">
            <span>Welcome,</span>
            <h2>Admin</h2>
          </div>
        </div>
        <!-- /menu profile quick info -->

        <br/>

        <!-- sidebar menu -->
        <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
          <div class="menu_section">
            <h3>General</h3>
            <ul class="nav side-menu">
              <li>
                <a><i class="fa fa-home"></i> 仪表盘 <span class="fa fa-chevron-down"></span></a>
                <ul class="nav child_menu">
                  <li><a href="index.html">Hdfs 集群状态</a></li>
                  <li><a href="cluster_yarn_state.html">Yarn 集群状态</a></li>
                  <!--<li><a href="cluster_yarn_info.html">Yarn 详情</a></li>-->
                </ul>

              </li>
              <li>
                <a><i class="fa fa-cubes"></i> 安装部署 <span class="fa fa-chevron-down"></span></a>
                <ul class="nav child_menu">
                  <li><a href="#">zookeeper</a></li>
                  <li><a href="#">hadoop</a></li>
                  <li><a href="#">kerberos</a></li>
                  <li><a href="#">elasticsearch</a></li>
                  <li><a href="#">grafana</a></li>
                  <li><a href="#">prometheus</a></li>
                  <li><a href="#">node_exporter</a></li>
                </ul>
              </li>
            </ul>
          </div>
        </div>
        <!-- /sidebar menu -->

        <!-- /menu footer buttons -->
        <div class="sidebar-footer hidden-small">
          <a data-toggle="tooltip" data-placement="top" title="Settings">
            <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
          </a>
          <a data-toggle="tooltip" data-placement="top" title="FullScreen">
            <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
          </a>
          <a data-toggle="tooltip" data-placement="top" title="Lock">
            <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
          </a>
          <a data-toggle="tooltip" data-placement="top" title="Logout" href="login.html">
            <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
          </a>
        </div>
        <!-- /menu footer buttons -->
      </div>
    </div>

    <!-- top navigation -->
    <div class="top_nav">
      <div class="nav_menu">
        <nav>
          <div class="nav toggle">
            <a id="menu_toggle"><i class="fa fa-bars"></i></a>
          </div>

          <ul class="nav navbar-nav navbar-right">
            <li class="">
              <a
                  href="javascript:;"
                  class="user-profile dropdown-toggle"
                  data-toggle="dropdown"
                  aria-expanded="false"
              >
                <img src="images/img.jpg" alt=""/>Admin
                <span class="fa fa-angle-down"></span>
              </a>
              <!--<ul class="dropdown-menu dropdown-usermenu pull-right">
                <li><a href="javascript:;"> Profile</a></li>
                <li>
                  <a href="javascript:;">
                    <span class="badge bg-red pull-right">50%</span>
                    <span>Settings</span>
                  </a>
                </li>
                <li><a href="javascript:;">Help</a></li>
                <li>
                  <a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
                </li>
              </ul>-->
            </li>

            <li role="presentation" class="dropdown">
              <a
                  href="javascript:;"
                  class="dropdown-toggle info-number"
                  data-toggle="dropdown"
                  aria-expanded="false"
              >
                <i class="fa fa-envelope-o"></i>
                <span class="badge bg-green">6</span>
              </a>
              <ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu">
                <li>
                  <a>
                    <span class="image"><img src="images/img.jpg" alt="Profile Image"/></span>
                    <span>
                        <span>John Smith</span>
                        <span class="time">3 mins ago</span>
                      </span>
                    <span class="message">
                        Film festivals used to be do-or-die moments for movie makers. They were where...
                      </span>
                  </a>
                </li>
                <li>
                  <a>
                    <span class="image"><img src="images/img.jpg" alt="Profile Image"/></span>
                    <span>
                        <span>John Smith</span>
                        <span class="time">3 mins ago</span>
                      </span>
                    <span class="message">
                        Film festivals used to be do-or-die moments for movie makers. They were where...
                      </span>
                  </a>
                </li>
                <li>
                  <a>
                    <span class="image"><img src="images/img.jpg" alt="Profile Image"/></span>
                    <span>
                        <span>John Smith</span>
                        <span class="time">3 mins ago</span>
                      </span>
                    <span class="message">
                        Film festivals used to be do-or-die moments for movie makers. They were where...
                      </span>
                  </a>
                </li>
                <li>
                  <a>
                    <span class="image"><img src="images/img.jpg" alt="Profile Image"/></span>
                    <span>
                        <span>John Smith</span>
                        <span class="time">3 mins ago</span>
                      </span>
                    <span class="message">
                        Film festivals used to be do-or-die moments for movie makers. They were where...
                      </span>
                  </a>
                </li>
                <li>
                  <div class="text-center">
                    <a>
                      <strong>See All Alerts</strong>
                      <i class="fa fa-angle-right"></i>
                    </a>
                  </div>
                </li>
              </ul>
            </li>
          </ul>
        </nav>
      </div>
    </div>
    <!-- /top navigation -->

    <!-- page content -->
    <div class="right_col" role="main">
      <!-- top tiles -->
      <!--          <h3>线上集群名称、节点数量、总容量、使用率、故障节点、存储日增数据量、版本</h3>-->
      <hr/>
      <div class="row tile_count">
        <div class="col-md-3 col-sm-4 col-xs-6 tile_stats_count" th:each="item:${indexPageList}">
            <span class="count_top">
                <span class="fa fa-anchor"></span>
                <b><a class="purple" href="cluster_hdfs_info" target="_blank"
                      th:href="@{cluster_hdfs_info(clusterId=${item.getDfsClusterState().getServiceId()})}"
                      th:text="${item.getDfsClusterState().getServiceId()}"></a>
                </b>
            </span>
          <div class="count" >
            <span> 存储使用率 : </span>
            <span th:text="${item.getDfsClusterState().getPercentUsed()}"></span>
            <span> %</span>
          </div>
          <div >
            <span> 总存储 : </span>
            <span  th:text="${item.getDfsClusterState().getCapacityByteDesc()}"></span>
          </div>

          <span class="count_bottom"> 版本 :
              <i class="green" th:text="${item.getDfsClusterState().getVersion()}"> </i>
                </span>
        </div>
      </div>
      <div class="row">

        <div class="col-md-12">
          <div class="x_panel">
            <div class="x_title">
              <ul class="nav navbar-right panel_toolbox">
                <li>
                  <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li>
                  <a class="close-link"><i class="fa fa-close"></i></a>
                </li>
              </ul>
              <span>Namenodes</span>
            </div>
            <div class="x_content ">
              <table class="table table-bordered text-center">
                <thead>
                <tr>
                  <th class="text-center">集群别名</th>
                  <th class="text-center">命名空间</th>
                  <th class="text-center">Active地址</th>
                  <th class="text-center">RPC 地址</th>
                  <th class="text-center">Http 地址</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${indexPageList}">
                  <td th:text="${item.getClusterAlias().getAlias()}"></td>
                  <td th:text="${item.getDfsClusterState().getServiceId()}"></td>
                  <td th:text="${item.getDfsClusterState().getActiveNamenode()}"></td>
                  <td th:text="${item.getNameNodeState().getRpcAddress()}"></td>
                  <td >
                    <u><a th:href="@{'http://'+${item.getNameNodeState().getHttpAddress()}}" target="_blank" th:text="${item.getNameNodeState().getHttpAddress()}"></a>
                      </u>
                  </td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div>
        <div class="col-md-3 col-sm-3 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <span>文件数量</span>
              <ul class="nav navbar-right panel_toolbox">
                <li>
                  <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li>
                  <a class="close-link"><i class="fa fa-close"></i></a>
                </li>
              </ul>
              <div class="clearfix"></div>
            </div>
            <div class="x_content">
              <table class="table table-bordered">
                <thead>
                <tr>
                  <th class="text-center" >集群名称</th>
                  <th class="text-center" >文件数</th>
                </tr>
                </thead>
                <tbody th:each="item:${indexPageList}">
                <tr>
                  <td th:text="${item.getDfsClusterState().getServiceId()}"></td>
                  <td th:text="${item.getDfsClusterState().getTotalFiles()}"></td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="col-md-3 col-sm-3 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <span>块数量</span>
              <ul class="nav navbar-right panel_toolbox">
                <li>
                  <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li>
                  <a class="close-link"><i class="fa fa-close"></i></a>
                </li>
              </ul>
              <div class="clearfix"></div>
            </div>
            <div class="x_content">
              <table class="table table-bordered">
                <thead>
                <tr>
                  <th>集群名称</th>
                  <th>块数</th>
                </tr>
                </thead>
                <tbody th:each="item:${indexPageList}">
                <tr>
                  <td th:text="${item.getDfsClusterState().getServiceId()}"></td>
                  <td th:text="${item.getDfsClusterState().getTotalBlocks()}"></td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>

        <div class="col-md-3 col-sm-3 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <span>复制数据块</span>
              <ul class="nav navbar-right panel_toolbox">
                <li>
                  <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li>
                  <a class="close-link"><i class="fa fa-close"></i></a>
                </li>
              </ul>
              <div class="clearfix"></div>
            </div>
            <div class="x_content">
              <table class="table table-bordered">
                <thead>
                <tr>
                  <th>集群名称</th>
                  <th>复制数</th>
                </tr>
                </thead>
                <tbody th:each="item:${indexPageList}">
                <tr>
                  <td th:text="${item.getDfsClusterState().getServiceId()}"></td>
                  <td th:text="${item.getDfsClusterState().getUnderReplicatedBlocks()}"></td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="col-md-3 col-sm-3 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <span>丢块数量</span>
              <ul class="nav navbar-right panel_toolbox">
                <li>
                  <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li>
                  <a class="close-link"><i class="fa fa-close"></i></a>
                </li>
              </ul>
              <div class="clearfix"></div>
            </div>
            <div class="x_content">
              <table class="table table-bordered">
                <thead>
                <tr>
                  <th>集群名称</th>
                  <th>丢块数</th>
                </tr>
                </thead>
                <tbody th:each="item:${indexPageList}">
                <tr>
                  <td th:text="${item.getDfsClusterState().getServiceId()}"></td>
                  <td th:text="${item.getDfsClusterState().getMissingBlocks()}"></td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- /page content -->

  <!-- footer content -->
  <footer>
    <div class="pull-right">
      Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
    </div>
    <div class="clearfix"></div>
  </footer>
  <!-- /footer content -->
</div>
</div>

<!-- jQuery -->
<script src="vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="vendors/nprogress/nprogress.js"></script>
<!-- Chart.js -->
<script src="vendors/Chart.js/dist/Chart.min.js"></script>
<!-- gauge.js -->
<script src="vendors/gauge.js/dist/gauge.min.js"></script>
<!-- bootstrap-progressbar -->
<script src="vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- iCheck -->
<script src="vendors/iCheck/icheck.min.js"></script>
<!-- Skycons -->
<script src="vendors/skycons/skycons.js"></script>
<!-- Flot -->
<script src="vendors/Flot/jquery.flot.js"></script>
<script src="vendors/Flot/jquery.flot.pie.js"></script>
<script src="vendors/Flot/jquery.flot.time.js"></script>
<script src="vendors/Flot/jquery.flot.stack.js"></script>
<script src="vendors/Flot/jquery.flot.resize.js"></script>
<!-- Flot plugins -->
<script src="vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="vendors/DateJS/build/date.js"></script>
<!-- JQVMap -->
<script src="vendors/jqvmap/dist/jquery.vmap.js"></script>
<script src="vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
<script src="vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="vendors/moment/min/moment.min.js"></script>
<script src="vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

<!-- Custom Theme Scripts -->
<script src="build/js/custom.min.js"></script>
</body>
</html>
